﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MS.Data.Infratructrue.Istanbul
{
    /// <summary>
    /// 仓储接口
    /// </summary>
    public interface IBaseRepository<T> where T : class
    {
        /// <summary>
        /// 获取全部
        /// </summary>
        /// <returns>返回结果</returns>
        IQueryable<T> GetAll();
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns>返回结果</returns>
        Task<int> Add(T entity);
        /// <summary>
        /// 更新
        /// </summary>
        Task<int> Update(T entity);
        ///// <summary>
        ///// 删除
        ///// </summary>
        ///// <param name="entity">实体</param>
        ///// <returns>返回结果</returns>
        //Task<int> Del(int Id);
        /// <summary>
        /// 查询编号
        /// </summary>
        /// <param name="Id">编号</param>
        /// <returns>返回结果</returns>
        Task<T> Bysty(int Id);
        
    }
}
